/*
* ECARX Technology Limited is the owner of the copyright and the trade secret of this software.
* Without permission, no one has the right to obtain, disclose or use this software in any way.
*/

package ecarx.xsf.notificationcenter.receiver;

import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.ecarx.eas.framework.sdk.push.PushBroadcastReceiver;

import ecarx.xsf.notificationcenter.push.NotificationPushFlavor;


/**
 * FileName: NotificationPushReceiver.java <br>
 * Description : PNS 推送接收广播 <br>
 * Create Time: 2019/09/11 <br>
 * Update Time: 2021/8/4 11:32 <br>
 *
 * @since 1.0.0
 */
public class NotificationPushReceiver extends PushBroadcastReceiver {

    private static final String TAG = "NotificationPushReceiver";
    private Context mContext;

    @Override
    public void onReceive(Context context, Intent intent) {
        mContext = context;
        super.onReceive(context, intent);
    }

    @Override
    protected void onReceiveMessageData(String payload) {
        Log.i(TAG, "onReceiveMessageData: " + payload);
        NotificationPushFlavor.getPushManager().handlePush(mContext, payload);
    }

}
